<?php

declare(strict_types=1);

namespace App\Job;

use Hyperf\AsyncQueue\Job;

class DsrSendSmsLogAddJob extends Job
{
    public $params;

    public function __construct($params)
    {
        $this->params = $params;
    }

    public function handle()
    {
        if (is_array($this->params)) {
			$this->params['time'] = time();
			$this->params['_id'] = createId('S');
            mongodb2()->dsr_send_sms_log->insertOne($this->params);
        }
        unset( $this->params);
    }
}
